/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package nsip.transport;

import java.util.Map;

/**
 * The transport is used by the agent(s) to communicate with the market
 * @author nico.rehwaldt
 */
public interface NsipTransport {

    /**
     * Sends a message to the given address.
     * 
     * @param address
     * @param message
     */
    public void sendMessage(String address, Object message);

    /**
     * Sends the messages contained in the map to the address they are stored
     * under.
     * 
     * @param messageMap
     */
    public void sendMessages(Map<String, ?> messageMap);

    /**
     * Generate an id which is unique for all components which use this
     * transport
     * 
     * @return
     */
    public int generateID();
}
